package com.huobao.shangjia_version.activitys;

import java.util.Map;

import org.xutils.view.annotation.ViewInject;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.huobao.yunying.base.HuobaoBaseActivity;
import com.huobao.yunying.https.Http;
import com.huobao.yunying.https.HttpListener;
import com.huobao.yunying.https.HttpUtil;
import com.huobao.yunying.utils.ImageUtils;
import com.huobao.zhangying.R;

import android.widget.ImageView;

public class Act_Store_share extends HuobaoBaseActivity {

	@ViewInject(R.id.imageview)
	private ImageView imageview;
	@Override
	protected int getContentView() {
		// TODO Auto-generated method stub
		return R.layout.layout_store_share;
	}

	@Override
	protected String getTitleText() {
		// TODO Auto-generated method stub
		return getString(R.string.title_9);
	}

	@Override
	protected void init() {
		getData();
	}
	
	private void getData(){
		Map<String, String> map = HttpUtil.getParams("app","shopmember","act","erweima");
		Http.getInstant().sendRequest(context, map, new HttpListener() {
			
			@Override
			public void onHttpSuccess(String result) {
				JSONObject jsonObject = JSON.parseObject(result);
				jsonObject = jsonObject.getJSONObject("retval");
				String scan_code = jsonObject.getString("scan_code");
				ImageUtils.loadimg(imageview, scan_code);
			}
			
			@Override
			public void onHttpError(String error) {
				// TODO Auto-generated method stub
				
			}
		});
	}

}
